package com.yun.zf.app.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yun.zf.common.admin.dto.community.CommunityBasicDto;
import com.yun.zf.common.admin.dto.community.CommunityDto;
import com.yun.zf.common.admin.model.search.CommunitySearchMo;
import com.yun.zf.common.app.domain.ZfCommunity;
import com.yun.zf.common.app.dto.detail.CommunityNearByDto;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 社区表 服务类
 * </p>
 *
 * @author cj
 * @since 2021-01-29
 */
public interface ZfCommunityService extends IService<ZfCommunity> {

    /**
     * 首页根据城市获取品质小区
     *
     * @param cityCode
     * @return
     */
    Page<CommunityNearByDto> getBrandCommunity(Long cityCode, int current, int pageSize);

    /**
     * 小区基本信息
     *
     * @param communityId
     * @return
     */
    CommunityNearByDto findommunityBasic(Long communityId);

    ZfCommunity getCommunity(Long communityId, Long provinceCode, Long cityCode);

    /**
     * 获取小区基本信息列表
     *
     * @param ids
     * @return
     */
    List<CommunityNearByDto> getBasicCommunity(List<Long> ids);

    /**
     * 找小区详情页-获取小区基本信息
     *
     * @param id
     * @return
     */
    CommunityBasicDto getBasic(Long communityId);

    Map<String, Object> searchCommunitys(CommunitySearchMo communitySearchMo);


    CommunityDto getDetailInfo(Long communityId);

    /**
     * 获取附近小区信息
     * @param communityId
     * @param lat
     * @param lon
     * @param distance
     * @return
     */
    List<CommunityNearByDto> nearCommunityList(Long communityId,double lat, double lon, double distance);

}
